var updateapi = {
    updatedetail: function (that, uinfo) {
        wx.showToast('提交中', 'loading');
        try {
            if (uinfo) {
                wx.cloud.callFunction({
                    name: 'updatedetail',
                    data: {
                        editobj: JSON.stringify(that.data.editobj),
                        id: that.data.id,
                        type1: that.data.type1,
                        type2: that.data.type2,
                        type2cn: that.data.type2cn,
                        uinfo:uinfo
                    },
                    success: res => {
                        if (!res.result) {
                            that.showToast('修改成功', 'none');
                        } else {
                            that.showToast(res.result+',请按左上角返回按钮查看修改内容', 'none');
                        }
                    },
                    fail: err => {
                        that.showToast('发布失败', 'none');
                    }
                })
            } else {
                that.showToast('获取用户名失败', 'none');
            }
        } catch (e) {

            that.showToast('提交失败', 'none');
        }
    }
}
module.exports = updateapi;